﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZhimeiSoft.Framework.Client.Base;

using ZhimeiSoft.CharmManager.DOL;

namespace ZhimeiSoft.CharmManager.Client.Forms
{
    public partial class EmployeeInfo : BaseUserControl
    {
        public EmployeeInfo()
        {
            InitializeComponent();
        }

        private void keyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar.Equals((char)Keys.Enter))
            {
                int iTableIndex = ((System.Windows.Forms.Control)sender).TabIndex + 1;
                foreach (System.Windows.Forms.Control ctrl in this.Controls)
                {
                    if (ctrl.Controls.Count > 0)
                    {
                        setControlFocus(iTableIndex, ctrl);
                    }
                }

            }
        }

        private void setControlFocus(int iNextTableIndex, System.Windows.Forms.Control currControl)
        {
            if (currControl.TabIndex == iNextTableIndex)
            {
                currControl.Focus();
                return;
            }
            else
            {
                foreach (System.Windows.Forms.Control ctrl in currControl.Controls)
                {
                    setControlFocus(iNextTableIndex, ctrl);
                }
            }
        }


        private void textBoxDropDown1_Enter(object sender, EventArgs e)
        { 
 
        }

    }
}
